//
//  LAOMIWaterfallLayout.h
//  LAOMIKit
//
//  Created by niki on 2019/7/10.
//  Copyright © 2019年 niki. All rights reserved.
//
#import <UIKit/UIKit.h>

@class LAOMIWaterfallLayout;

@protocol  LAOMIWaterfallLayoutDelegate<NSObject>

@required
/**
 * 每个item的高度
 */
- (CGFloat)waterFallLayout:(LAOMIWaterfallLayout *)waterFallLayout heightForItemAtIndexPath:(NSUInteger)indexPath itemWidth:(CGFloat)itemWidth;

@optional
/**
 * 有多少列
 */
- (NSUInteger)columnCountInWaterFallLayout:(LAOMIWaterfallLayout *)waterFallLayout;

/**
 * 每列之间的间距
 */
- (CGFloat)columnMarginInWaterFallLayout:(LAOMIWaterfallLayout *)waterFallLayout;

/**
 * 每行之间的间距
 */
- (CGFloat)rowMarginInWaterFallLayout:(LAOMIWaterfallLayout *)waterFallLayout;

/**
 * 每个item的内边距
 */
- (UIEdgeInsets)edgeInsetdInWaterFallLayout:(LAOMIWaterfallLayout *)waterFallLayout;


@end

@interface LAOMIWaterfallLayout : UICollectionViewLayout
/** 代理 */
@property (nonatomic, weak) id<LAOMIWaterfallLayoutDelegate> delegate;

@end
